table.insert(itemActions,
	function(item, action)
		-- UNIQUE weapons
		-- ItemKind.Weapon doesn't work for "any" weapon afaik
		-- too many weapon types to check against
		-- all uniques pass through this func, sorry!
		if not (item.quality == ItemQuality.Unique) then
			return false
		end

		return processItemList(item, action, uniqueWeapons)
	end
)

-- see: dir .. "readme.txt" for information regarding itemLists

-- note: "hasSkill" could now be used to find skills (boneshade, jadetalon)
	-- havn't had time to change it.

uniqueWeapons = {
----------------------------------------
-- Axes
--- Normal Axes
	--{"hax", 1, false}, -- The Gnasher
	--{"axe", 1, false}, -- Deathspade
	--{"2ax", 1, false}, -- Bladebone
	--{"mpi", 1, false}, -- Skull Splitter
	--{"wax", 1, false}, -- Rakescar
	--{"lax", 1, false}, -- Axe of Fechmar
	--{"bax", 1, false}, -- Goreshovel
	--{"btx", 1, false}, -- The Chieftain
	--{"gax", 1, false}, -- Brainhew
	--{"gix", 1, false}, -- Humongous
--- Exceptional Axes
	--{"9ha", 1, false}, -- Coldkill
	--{"9ax", 1, false}, -- Butcher's Pupil
	--{"92a", 1, false}, -- Islestrike
	--{"9mp", 1, false}, -- Pompeii's Wrath
	--{"9wa", 1, false}, -- Guardian Naga
	--{"9la", 1, false}, -- Warlord's Trust
	--{"9ba", 1, false}, -- Spellsteel
	--{"9bt", 1, false}, -- Stormrider
	--{"9ga", 1, false}, -- Boneslayer Blade
	--{"9gi", 1, false}, -- The Minotaur
--- Elite Axes
	{"7ha", 6, true, -- Razor's Edge
		function(item)
			if not item.flags.Ethereal then
				return false -- only keeping eth
			end

			if item.flags.Identified then
				return (findStat(item, "Max Damage Percent") >= 200) -- 220+ed? (225 perf)
			end

			return true -- unid
		end
	},
	{"72a", 7, true, -- Rune Master
		function(item)
			if item.flags.Identified then
				if item.flags.Ethereal then
					return (findStat(item, "Sockets") == 5) -- eth 5 (perf) soc?
				else
					return (
							findStat(item, "Max Damage Percent") >= 245 and
							findStat(item, "Sockets") == 5 -- noneth 5soc and 265+ed? (270 perf)
							)
				end
			end

			return true -- unid
		end
	},
	--{"7mp", 1, false}, -- Cranebeak
	{"7wa", 8, false}, -- Death Cleaver -- keeping all
	--{"7ba", 1, false}, -- Ethereal Edge
	--{"7bt", 1, false}, -- Hellslayer
	--{"7ga", 1, false}, -- Messerschmidt's Reaver
	--{"7gi", 1, false}, -- Executioner's Justice
----------------------------------------
-- Bows
--- Normal Bows
	--{"sbw", 1, false}, -- Pluckeye
	--{"hbw", 1, false}, -- Witherstring
	--{"lbw", 1, false}, -- Raven Claw
	--{"cbw", 1, false}, -- Rogue's Bow
	--{"sbb", 1, false}, -- Stormstrike
	--{"lbb", 1, false}, -- Wizendraw
	--{"swb", 1, false}, -- Hellclap
	--{"lwb", 1, false}, -- Blastbark
--- Exceptional Bows
	--{"8sb", 1, false}, -- Skystrike
	--{"8hb", 1, false}, -- Riphook
	--{"8lb", 1, false}, -- Kuko Shakaku
	--{"8cb", 1, false}, -- Endlesshail
	--{"8s8", 1, false}, -- Witchwild String
	--{"8l8", 1, false}, -- Cliffkiller
	--{"8sw", 1, false}, -- Magewrath
	--{"8lw", 1, false}, -- Goldstrike Arch
--- Elite Bows
	--{"6l7", 1, false}, -- Eaglehorn
	{"6sw", 6, true, -- Widowmaker
		function(item)
			-- can't be eth
			if item.flags.Identified then
				return (
						findStat(item, "Max Damage Percent") >= 190 and -- 195+ed? (200 perf)
						findStat(item, "Single Skill") == 5 -- and 5 (perf) skill?
						)
			end

			return true -- unid
		end
	},
	{"6lw", 7, false}, -- Windforce -- keeping all
----------------------------------------
-- Crossbows
--- Normal Crossbows
	--{"lxb", 1, false}, -- Leadcrow
	--{"mxb", 1, false}, -- Ichorsting
	--{"hxb", 1, false}, -- Hellcast
	--{"rxb", 1, false}, -- Doomslinger
--- Exceptional Crossbows
	--{"8lx", 1, false}, -- Langer Briser
	--{"8mx", 1, false}, -- Pus Spitter
	--{"8hx", 1, false}, -- Buriza-Do Kyanon
	--{"8rx", 1, false}, -- Demon Machine
--- Elite Crossbows
	--{"6hx", 1, false}, -- Hellrack
	--{"6rx", 1, false}, -- Gut Siphon
----------------------------------------
-- Daggers
--- Normal Daggers
	--{"dgr", 1, false}, -- Gull
	--{"dir", 1, false}, -- The Diggler
	--{"kri", 1, false}, -- The Jade Tan Do
	--{"bld", 1, false}, -- Spectral Shard
--- Exceptional Daggers
	--{"9dg", 1, false}, -- Spineripper
	--{"9di", 1, false}, -- Heart Carver
	--{"9kr", 1, false}, -- Blackbog's Sharp
	--{"9bl", 1, false}, -- Stormspike
--- Elite Daggers
	--{"7dg", 1, false}, -- Wizardspike
	--{"7kr", 1, false}, -- Fleshripper
	--{"7bl", 1, false}, -- Ghostflame
----------------------------------------
-- Maces
--- Normal Maces
	--{"clb", 1, false}, -- Felloak
	--{"spc", 1, false}, -- Stoutnail
	--{"mac", 1, false}, -- Crushflange
	--{"mst", 1, false}, -- Bloodrise
	--{"fla", 1, false}, -- The General's Tan Do Li Ga
	--{"whm", 1, false}, -- Ironstone
	--{"mau", 1, false}, -- Bonesnap
	--{"gma", 1, false}, -- Steeldriver
--- Exceptional Maces
	--{"9cl", 1, false}, -- Dark Clan Crusher
	--{"9sp", 1, false}, -- Fleshrender
	--{"9ma", 1, false}, -- Sureshrill Frost
	--{"9mt", 1, false}, -- Moonfall
	--{"9fl", 1, false}, -- Baezil's Vortex
	--{"9wh", 1, false}, -- Earthshaker
	--{"9m9", 1, false}, -- Bloodtree Stump
	--{"9gm", 1, false}, -- The Gavel Of Pain
--- Elite Maces
	--{"7cl", 1, false}, -- Nord's Tenderizer
	--{"7sp", 1, false}, -- Demon Limb
	--{"7mf", 1, false}, -- Baranar's Star
	{"7fl", 8, true, -- Horizon's Tornado or Stormlash
		function(item)
			-- don't care if eth
			if item.flags.Identified then
				if item.uniqueItem.Index == 360 then -- only keeping stormlash
					return true
				else
					return false -- not stormlash
				end
			end

			return true -- unid
		end
	},
	--{"7wh", 1, false}, -- Stone Crusher or Schaefer's Hammer
	--{"7m7", 1, false}, -- Windhammer
	--{"7gm", 1, false}, -- Earth Shifter or The Cranium Basher
----------------------------------------
-- Polearms
--- Normal Polearms
	--{"bar", 1, false}, -- Dimoak's Hew
	--{"vou", 1, false}, -- Steelgoad
	--{"scy", 1, false}, -- Soul Harvest
	--{"pax", 1, false}, -- The Battlebranch
	--{"hal", 1, false}, -- Woestave
	--{"wsc", 1, false}, -- The Grim Reaper
--- Exceptional Polearms
	--{"9b7", 1, false}, -- The Meat Scraper
	--{"9vo", 1, false}, -- Blackleach Blade
	--{"9s8", 1, false}, -- Athena's Wrath
	--{"9pa", 1, false}, -- Pierre Tombale Couant
	--{"9h9", 1, false}, -- Husoldal Evo
	--{"9wc", 1, false}, -- Grim's Burning Dead
--- Elite Polearms
	--{"7o7", 1, false}, -- Bonehew
	{"7s8", 7, false, -- The Reaper's Toll
		function(item)
			return item.flags.Ethereal -- only keeping eth
		end
	},
	{"7pa", 8, false, -- Tomb Reaver
		function (item)
			return item.flags.Ethereal -- only keeping eth
		end
	},
	--{"7wc", 1, false}, -- Stormspire
----------------------------------------
-- Scepters
--- Normal Scepters
	--{"scp", 1, false}, -- Knell Striker
	--{"gsc", 1, false}, -- Rusthandle
	--{"wsp", 1, false}, -- Stormeye
--- Exceptional Scepters
	--{"9sc", 1, false}, -- Zakarum's Hand
	--{"9qs", 1, false}, -- The Fetid Sprinkler
	--{"9ws", 1, false}, -- Hand of Blessed Light
--- Elite Scepters
	{"7sc", 6, true, -- Heaven's Light or The Redeemer
		function(item)
			-- don't care if eth
			if item.flags.Identified then
				if item.uniqueItem.Index == 371 then -- only keeping heavens
					return (
								findStat(item, "Class Skills Bonus") == 3 and -- 3skill?
								findStat(item, "Sockets") == 2 -- and 2soc?
								)
				else
					return false -- not heavens
				end
			end

			return true -- unid
		end
	},
	{"7ws", 8, true, -- Astreon's Iron Ward
		function(item)
			-- don't care if eth
			if item.flags.Identified then
				return (findStat(item, "Skill Tab Bonus") == 4) -- 4skill?
			end

			return true -- unid
		end
	},
----------------------------------------
-- Spears
--- Normal Spears
	--{"spr", 1, false}, -- The Dragon Chang
	--{"tri", 1, false}, -- Razortine
	--{"brn", 1, false}, -- Bloodthief
	--{"spt", 1, false}, -- Lance of Yaggai
	--{"pik", 1, false}, -- The Tannr Gorerod
--- Exceptional Spears
	--{"9sr", 1, false}, -- The Impaler
	--{"9tr", 1, false}, -- Kelpie Snare
	--{"9br", 1, false}, -- Soulfeast Tine
	--{"9st", 1, false}, -- Hone Sundan
	--{"9p9", 1, false}, -- Spire of Honor
--- Elite Spears
	{"7sr", 7, true, -- Arioc's Needle
		function(item)
			if not item.flags.Ethereal then -- only keeping eth
				return false
			end

			if item.flags.Identified then
				return (
						findStat(item, "Max Damage Percent") >= 225 and -- 225+ed? (230 perf)
						findStat(item, "All Skills Bonus") == 4 -- and 4 (perf) skill?
						)
			end

			return true -- unid
		end
	},
	--{"7br", 1, false}, -- Viperfork
	--{"7p7", 1, false}, -- Steel Pillar
----------------------------------------
-- Staves
--- Normal Staves
	--{"sst", 1, false}, -- Bane Ash
	--{"lst", 1, false}, -- Serpent Lord
	--{"gst", 1, false}, -- Spire of Lazarus
	--{"bst", 1, false}, -- The Salamander
	--{"wst", 1, false}, -- The Iron Jang Bong
--- Exceptional Staves
	--{"8ss", 1, false}, -- Razorswitch
	{"8ls", 7, false, -- Ribcracker
		function(item)
			return item.flags.Ethereal -- only keeping eth
		end
	},
	--{"8cs", 1, false}, -- Chromatic Ire
	--{"8bs", 1, false}, -- Warpspear
	--{"8ws", 1, false}, -- Skull Collector
--- Elite Staves
	{"6cs", 6, true, -- Ondal's Wisdom
		function(item)
			-- don't care if eth			
			if item.flags.Identified then
				return (findStat(item, "All Skills Bonus") == 4) -- 4 (perf) skill?
			end

			return true -- unid
		end
	},
	--{"6ws", 1, false}, -- Mang Song's Lesson
----------------------------------------
-- Swords
--- Normal Swords
	--{"ssd", 1, false}, -- Rixot's Keen
	--{"scm", 1, false}, -- Blood Crescent
	--{"sbr", 1, false}, -- Skewer of Krintiz
	--{"flc", 1, false}, -- Gleamscythe
	--{"bsd", 1, false}, -- Griswold's Edge
	--{"lsd", 1, false}, -- Hellplague
	--{"wsd", 1, false}, -- Culwen's Point
	--{"2hs", 1, false}, -- Shadowfang
	--{"clm", 1, false}, -- Soulflay
	--{"gis", 1, false}, -- Kinemil's Awl
	--{"bsw", 1, false}, -- Blacktongue
	--{"flb", 1, false}, -- Ripsaw
	--{"gsd", 1, false}, -- The Patriarch
--- Exceptional Swords
	--{"9ss", 1, false}, -- Bloodletter
	--{"9sm", 1, false}, -- Coldsteel Eye
	--{"9sb", 1, false}, -- Hexfire
	--{"9fc", 1, false}, -- Blade Of Ali Baba
	--{"9cr", 1, false}, -- Ginther's Rift
	--{"9bs", 1, false}, -- Headstriker
	--{"9ls", 1, false}, -- Plague Bearer
	--{"9wd", 1, false}, -- The Atlantean
	--{"92h", 1, false}, -- Crainte Vomir
	--{"9cm", 1, false}, -- Bing Sz Wang
	--{"9gs", 1, false}, -- The Vile Husk
	--{"9b9", 1, false}, -- Cloudcrack
	--{"9fb", 1, false}, -- Todesfaelle Flamme
	--{"9gd", 1, false}, -- Swordguard
--- Elite Swords
	--{"7sm", 1, false}, -- Djinn Slayer
	--{"7sb", 1, false}, -- Bloodmoon
	{"7cr", 6, true, -- Lightsabre or Azurewrath
		function(item)
			-- can't be eth
			if item.flags.Identified then
				if item.uniqueItem.Index == 301 then -- only keeping azure
					return true
				else
					return false -- not azure
				end
			end

			return true -- unid
		end
	},
	--{"7ls", 1, false}, -- Frostwind
	{"7gs", 5, true, -- Flamebellow
			function(item)
			-- don't care if eth
			if item.flags.Identified then
				return (findStat(item, "Single Skill") == 18) -- 18 (perf) skill?
			end

			return true -- unid
		end
	},
	--{"7b7", 1, false}, -- Doombringer
	{"7gd", 5, true, -- The Grandfather
		function(item)
			-- can't be eth
			if item.flags.Identified then
				return (findStat(item, "Max Damage Percent") >= 245) -- 245+ed? (250 perf)
			end

			return true -- unid
		end
	},
----------------------------------------
-- Wands
--- Normal Wands
	--{"wnd", 1, false}, -- Torch of Iro
	--{"ywn", 1, false}, -- Maelstrom
	--{"bwn", 1, false}, -- Gravenspine
	--{"gwn", 1, false}, -- Ume's Lament
--- Exceptional Wands
	--{"9wn", 1, false}, -- Suicide Branch
	--{"9yw", 1, false}, -- Carin Shard
	--{"9bw", 1, false}, -- Arm of King Leoric
	--{"9gw", 1, false}, -- Blackhand Key
--- Elite Wands
	{"7bw", 5, true, -- Boneshade
		function(item)
			if item.flags.Identified then
				return isGoodBoneshade(item) -- see bottom
			end

			return true -- unid
		end
	},
	{"7gw", 10, false}, -- Death's Web -- keeping all
----------------------------------------
-- Throwing Weapons
--- Exceptional Throwing Weapons
	--{"9tk", 1, false}, -- Deathbit
	--{"9ta", 1, false}, -- The Scalper
--- Elite Throwing Weapons
	{"7bk", 6, true, -- Warshrike
		function(item)
			if item.flags.Ethereal then -- only keeping eth
				if item.flags.Identified then
					return (findStat(item, "Max Damage Percent") >= 240) -- 240+ed? (250 perf)
				else
					return true -- unid
				end
			else
				return false -- not eth
			end
		end
	},
	--{"7ta", 1, false}, -- Gimmershred
	{"7b8", 7, true, -- Lacerator
		function(item)
			if item.flags.Ethereal then -- only keeping eth
				if item.flags.Identified then
					return (findStat(item, "Max Damage Percent") >= 170) -- 200+ed? (210 perf)
				else
					return true -- unid
				end
			else
				return false -- not eth
			end
		end
	},
----------------------------------------
-- Javelins
--- Elite Javelins
	{"7s7", 6, true, -- Demon's Arch
		function(item)
			if item.flags.Ethereal then -- only keeping eth
				if item.flags.Identified then
					return (findStat(item, "Max Damage Percent") >= 200) -- 200+ed? (210 perf)
				else
					return true -- unid
				end
			else
				return false -- not eth
			end
		end
	},
	--{"7gl", 1, false}, -- Wraith Flight
	{"7ts", 7, true, -- Gargoyle's Bite
		function(item)
			if item.flags.Ethereal then -- only keeping eth
				if item.flags.Identified then
					return (findStat(item, "Max Damage Percent") >= 220) -- 220+ed? (230 perf)
				else
					return true -- unid
				end
			else
				return false -- not eth
			end
		end
	},
----------------------------------------
-- Amazon Weapons
	--{"am9", 1, false}, -- Lycander's Flank
	{"amd", 6, true, -- Stoneraven
		function(item)
			if not item.flags.Ethereal then -- only keeping eth
				return false
			end

			if item.flags.Identified then
				return (
						findStat(item, "Max Damage Percent") >= 270 and -- 270+ed? (280 perf)
						findStat(item, "Skill Tab Bonus") == 3 -- and 3 (perf) skills?
						)
			end

			return true -- unid
		end
	},
	{"ama", 7, true, -- Titan's Revenge
		function(item)
			if item.flags.Ethereal then -- keeping all eth
				return true
			end
			
			if item.flags.Identified then -- noneth
				return (
						findStat(item, "Max Damage Percent") >= 195 and -- 195+ed? (200 perf)
						findStat(item, "Life Drain Min Damage") == 9 -- and 9 (perf) ll?
						)
			end

			return true -- unid
		end
	},
	{"amf", 7, true, -- Thunderstroke
		function(item)
			-- don't care if eth
			if item.flags.Identified then
				return (
						--findStat(item, "Max Damage Percent") >= 195 and -- 195+ed? (200 perf)
						findStat(item, "Skill Tab Bonus") == 4 -- and 4 (perf) skills?
						)
			end

			return true -- unid
		end
	},
	--{"am7", 1, false}, -- Lycander's Aim
	{"amb", 7, true, -- Blood Raven's Charge
		function(item)
			-- can't be eth
			if item.flags.Identified then
				return (
						findStat(item, "Max Damage Percent") >= 225 and -- 225+ed? (230 perf)
						findStat(item, "To Hit Percent") >= 250 and -- and 250+%ar? (300 perf)
						findStat(item, "Skill Tab Bonus") == 4 -- and 4 (perf) skills?
						)
			end

			return true -- unid
		end
	},
----------------------------------------
-- Assassin Weapons
	{"9hw", 7, true, -- Bartuc's Cut-Throat
		function(item)
			-- don't care if eth
			if item.flags.Identified then
				return (
						findStat(item, "Max Damage Percent") >= 195 and -- 195+ed? (200 perf)
						findStat(item, "Life Drain Min Damage") == 9 -- and 9 (perf) ll?
						)
			end

			return true -- unid
		end
	},
	{"7wb", 7, true, -- Jade Talon
		function(item)
			-- don't care if eth
			if item.flags.Identified then
				return (
						findStat(item, "Max Damage Percent") >= 235 and -- 235+ed? (240 perf)
						hasGoodJadeTalonSkills(item) -- and has good skills? (see bottom)
						)
			end

			return true -- unid
		end
	},
	--{"7cs", 1, false}, -- Shadow Killer
	--{"7lw", 1, false}, -- Firelizard's Talons
----------------------------------------
-- Sorceress Weapons
	{"oba", 5, false, -- The Oculus
		function(item)
			return item.flags.Ethereal -- only keeping eth
		end
	},
	{"obc", 8, true, -- Eschuta's Temper
		function(item)
			if item.flags.Identified then
				return isGoodEschuta(item) -- see bottom
			end

			return true -- unid
		end
	},
	{"obf", 10, false} -- Death's Fathom -- keeping all
}

function isGoodBoneshade(item)
	local spirit, spear = 0, 0
	
	for i = 0, item.mods:size() - 1 do
		if item.mods[i].Stat.Type == StatType.SingleSkill then
			if item.mods[i].Skill == SkillType.BoneSpirit then
				spirit = item.mods[i].Value
			elseif item.mods[i].Skill == SkillType.BoneSpear then
				spear = item.mods[i].Value
			end
		end
	end
	
	return (spirit == 2 and spear == 3)
end

function hasGoodJadeTalonSkills(item)
	local ma, shad = 0, 0

	for i = 0, item.mods:size() - 1 do
		if item.mods[i].Stat.Type == StatType.SkillTabBonus then
			if item.mods[i].Tab == SkillTab.MartialArts then
				ma = item.mods[i].Value
			elseif item.mods[i].Tab == SkillTab.ShadowDisciplines then
				shad = item.mods[i].Value
			end
		end
	end
	
	return (ma == 2 and shad == 2)
end

function isGoodEschuta(item)
	local sk, firem, lightm = 0, 0, 0
	
		for i = 0, item.mods:size() - 1 do
		if item.mods[i].Stat.Type == StatType.ClassSkillsBonus then
			sk = item.mods[i].Value
		elseif item.mods[i].Stat.Type == StatType.PassiveFireMastery then
			firem = item.mods[i].Value
		elseif item.mods[i].Stat.Type == StatType.PassiveLightningMastery then
			lightm = item.mods[i].Value
		end
	end
	
	return (sk == 3 and (firem >= 18 or lightm >= 18))
end
